import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Zhuce from '../views/Zhuce.vue'
import DocumentManages from '../views/DocumentManages.vue'
// import Header from '../components/Header.vue'
// import Side from '../components/Side.vue'
import Index from '../views/Index.vue'
import UserManages from '../views/userManages/UserManages'
// import DocumentManages from '../views/documentManages/DocumentManages.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Login',
        component: Login
    },
    {
        path:'/zhuce',
        name:"Zhuce",
        component:Zhuce
    },
    // {
    //     path:'/header',
    //     name:"Header",
    //     component:Header
    // },
    // {
    //     path:'/side',
    //     name:"Side",
    //     component:Side
    // },
    {
        path:"/home",
        name:"Home",
        component:Home,
        children:[{
            path:"/index",
            name:"Index",
            component:Index
        },
        {
            path:"/documentmanages",
            name:"DocuMentmages",
            component:DocumentManages
        },
        {
            path:"/usermanages",
            name:"UserManages",
            component:UserManages
        }
    ]
    }
    // {
    //     path:"/home",
    //     name:"Home",
    //     component:Home,
    //     children:[{
    //         path: '/documentmanages',
    //         name: 'DocumentManages',
    //         component: DocumentManages
    //     }]
    // }
    // {
    //     path:'/home',
    //     name:"Home",
    //     component:Home
    // }
    // {
    //     path: '/home',
    //     name: 'Home',
    //     component: Home,
    //     children: [{
    //             path: '/index',
    //             name: 'Index',
    //             component: Index
    //         },
    //         {
    //             path: '/usermanages',
    //             name: 'UserManages',
    //             component: UserManages
    //         },
    //         {
    //             path: '/documentmanages',
    //             name: 'DocumentManages',
    //             component: DocumentManages
    //         }
    //     ]
    // },
    // {
    //     path: '/about',
    //     name: 'About',
    //     // route level code-splitting
    //     // this generates a separate chunk (about.[hash].js) for this route
    //     // which is lazy-loaded when the route is visited.
    //     component: () =>
    //         import ( /* webpackChunkName: "about" */ '../views/About.vue')
    // }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router